package pers.liuchengyin.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import pers.liuchengyin.pojo.Result;
import pers.liuchengyin.pojo.SearchParam;
import pers.liuchengyin.pojo.SearchResult;
import pers.liuchengyin.pojo.SkuModel;
import pers.liuchengyin.service.EsSaveService;
import pers.liuchengyin.service.EsSearchService;

import java.util.List;

/**
 * @ClassName EsSearchController
 * @Description
 * @Author 柳成荫
 * @Date 2022/3/27
 */
@RestController
@RequestMapping("/es/doc")
public class EsSearchController {

    @Autowired
    private EsSearchService esSearchService;

    @PostMapping("/get/sku")
    public Result<SearchResult> getSku(@RequestBody SearchParam param) {
        return esSearchService.searchSku(param);
    }

}